package com.tarena.demo.luban.all.main.rpc;

import com.tarena.demo.luban.all.main.service.CartService;
import com.tarena.demo.luban.protocol.cart.param.CartDeleteParam;
import com.tarena.luban.demo.cart.api.CartApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class CartRpcApi implements CartApi {
    /**
     * 当前demo案例 包括鲁班项目 没有做分层的隔离
     * 所以 repository service dao controller 随便相互注入
     * 开发注意调用关系.
     */
    @Autowired
    private CartService cartService;
    @Override
    public Boolean deleteCart(CartDeleteParam cartDeleteParam) {
        cartService.deleteCart(cartDeleteParam);
        return true;
    }
}
